package cn.gailvlun.gll.net.cross;

import cn.gailvlun.gll.bean.PlaceHolder;
import cn.gailvlun.gll.net.ListRes;
import cn.gailvlun.gll.net.token.Authorization;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;

public interface CrossService {
    @Authorization
    @GET("x_room/question/")
    Observable<ListRes<CrossQuestion>> getQuestionList();

    @Authorization
    @POST("x_room/match/")
    Observable<StartMatchRes> startMatch(@Body StartMatchReq startMatchReq);

    @Authorization
    @DELETE("x_room/match/")
    Observable<PlaceHolder> quitMatch(@Query("x_match_id") int matchId);

    @Authorization
    @POST("x_room/question/")
    Observable<PlaceHolder> answerQuestion(@Body AnswerQuestionReq answerQuestionReq);

    @Authorization
    @GET("x_room/tag/")
    Observable<ListRes<GetTagRes>> getTag();

    @Authorization
    @POST("x_room/evaluate/")
    Observable<PlaceHolder> comment(@Body CrossCommentReq crossCommentReq);

    @Authorization
    @PUT("x_room/match/")
    Observable<PlaceHolder> leaveRoom(@Body LeaveRoomReq leaveRoomReq);
}
